package com.promise.jokerdream.network

/**
 * HTTP请求接口
 */
interface HttpApi {
    
    /**
     * GET请求
     * @param url 请求地址
     * @param headers 请求头（可选）
     * @param callback 回调接口
     */
    fun get(url: String, headers: Map<String, String>? = null, callback: IHttpCallback)
    
    
    /**
     * 内容类型枚举
     */
    enum class ContentType(val mediaType: String) {
        JSON("application/json; charset=utf-8"),
        FORM("application/x-www-form-urlencoded"),
        TEXT("text/plain; charset=utf-8"),
        XML("application/xml; charset=utf-8")
    }
}